package com.chuan.demo01;

//创建线程：继承Thread
//Tip：线程开启未必立即执行，取决于CPU调度
public class TestThread1 extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println("hello--"+i);
        }
    }

    public static void main(String[] args) {
        TestThread1 testThread1 = new TestThread1();
        testThread1.start();

        for (int i = 0; i < 20; i++) {
            System.out.println("hi--"+i);
        }
    }
}
